package com.frogs.ucenter.dao.ibatis;

import java.sql.SQLException;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Required;
import org.springframework.stereotype.Repository;

import com.frogs.framework.base.dao.ibatis.BaseDaoIbatis;
import com.frogs.framework.util.PageList;
import com.frogs.ucenter.dao.SubFlowInfoDao;
import com.frogs.ucenter.entity.SubFlowInfo;
import com.frogs.ucenter.entity.SubFlowInfoWithCompleteInfo;
import com.ibatis.sqlmap.client.SqlMapClient;

@Repository("subFlowInfoDao")
public class SubFlowInfoDaoImpl extends BaseDaoIbatis<SubFlowInfo> implements SubFlowInfoDao {

    public SubFlowInfoDaoImpl() {
        super();
        setNameSpace( "sub_flow_info" );
    }

    @Required
    @Autowired
    public void setSqlMapClientAutowired(SqlMapClient sqlMapClient) {
        super.setSqlMapClient( sqlMapClient );
    }
    
    @Override
    public PageList<SubFlowInfoWithCompleteInfo> selectWithCompletionByMap(Map<String, Object> params, int pageNo, int pageSize) throws SQLException {
		return queryforPageList(getNameSpace() + ".selectWithCompletionByMap", params, pageNo, pageSize, true);
	}
    
    @Override
    public PageList<SubFlowInfo> selectForTotalByMap(Map<String, Object> params, int pageNo, int pageSize) throws SQLException {
		return queryforPageList(getNameSpace() + ".selectForTotalByMap", params, pageNo, pageSize, true);
	}
}